package com.hktf.uilib.request;


import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * Created by luke on 17/8/24.
 */

public class HttpUrl {

   /* public static String url_I = "http://xinfeng.bjyixiong.com:7098";
    public static String url = "http://xinfeng.bjyixiong.com:7098/XFAndroidAPI/AndroidService0001/";*/
    /*public static String url_I = "http://192.168.0.209:8080";
    public static String url = "http://192.168.0.209:8080/XFAndroidAPI/AndroidService0001/";*/
    //新风 7099 新风刷写7098
    public static String url_I = "http://223.100.157.143:7099";
    public static String url = "http://223.100.157.143:7099/XFAndroidAPI/AndroidService0001/";

    public static String briefcommonrail(int page,int pageSize){
        return url+"briefcommonrail?page="+page+"&pagesize="+pageSize;
    }

    public static String briefservicestation(String name,int userId,int page,int pageSize){
        String decodeName = null;
        try {
            decodeName = URLEncoder.encode(name,"UTF-8");
            decodeName = URLEncoder.encode(decodeName,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }

        return url+"briefservicestation?keyword="+decodeName+"&userid="+userId+"&page="+page+"&pagesize="+pageSize;

        //return "http://test.ngrok.ithaoxin.cn:8088/briefservicestation?keyword="+name+"&userid="+userId+"&page="+page+"&pagesize="+pageSize;
    }
    public static String briefdamagegoods(int page,int pageSize){
        return url+"briefdamagegoods?page="+page+"&pagesize="+pageSize;
    }

    public static String checkorder(int userId){
        return url+"checkorder?userid="+userId;
    }

    public static String serviceStationDetail(int serviceId){
        return url+"servicestationbyid?id="+serviceId;
    }

    public static String damageGoodsDetail(int serviceId){
        return url+"damagegoodsbyid?id="+serviceId;
    }

    public static String getHourPrice(){
        return url+"getorderhourprice";
    }

    public static String getAppLimit(String userId){
        return url+"getapplimit?plate=1&userid="+userId;
    }
    public static String consentorder(int userId){
        return url+"consentorder?userid="+userId;
    }

    public static String nonconsentorder(int userId){
        return url+"nonconsentorder?userid="+userId;
    }

    public static String offsiteSentorder(int userId){
        return url+"offsiteorder?userid="+userId;
    }
    public static String submitOrder(){
        return url+"submitorder";
    }

    public static String orderdetail(String id){
        return url+"orderdetail?id="+id;
    }

    public static String serviceStation(double x,double y){
        return url+"briefrepairbylocation?x="+x+"&y="+y;
    }

    public static String distributionStation(double x,double y){
        return url+"briefpartsbylocation?x="+x+"&y="+y;
    }

    public static String postFile(){
        return url+"postfile";
    }

}
